{extend name="mainadmin@layouts/base" /}
{block name="main" }

<header class="header  b-b clearfix">
 <form id="forms" class="talbe-search form-inline "  method="post" action="{:url('getList')}" >
     <div class="page-breadcrumbs">
            <ul class="breadcrumb" >
                <li>
                    <i class="fa fa-ellipsis-v"></i>
                    <strong>设置</strong>
                </li>
            </ul>
        </div>
    </form>
</header>
<form class="form-horizontal form-validate form_vbox" method="post" action="{:url('save')}">
    <section class="vbox">
        <section class="scrollable  wrapper w-f">
            <section class="panel panel-default">
                <header>
                    <ul class="nav nav-tabs">
                        <li class="active"><a href="#basic" data-toggle="tab">基本配置</a></li>
                    </ul>
                </header>
                <div class="tab-content">
                    <div class="tab-pane active" id="basic">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">banner图片：</label>
                            <div class="controls col-sm-6">
                                <div class="defUpImgBox" data-toggle="uploaderOne">
                                    <img id="img_logo" src="{$setting.material_banner|default='__STATIC__/main/img/image.png'}">
                                    <input id="input_logo" type="hidden" name="setting[material_banner]"  value="{$setting.material_banner}">
                                    <div class="tips">点击上传</div>
                                </div>
                                <p>
                                    <span class="help-inline">图片尺寸：750*200像素</span>
                                </p>
                            </div>
                        </div>
                        <div class="form-group upgrade_level">
                            <label class="col-sm-2 control-label" >访问等级：</label>
                            <div class="col-sm-10">
                                <label class="radio-inline">
                                    <input type="checkbox" name="setting[material_auth][]" value="0" {if in_array(0,$setting.material_auth) }checked{/if} >粉丝
                                </label>
                                {volist name="UsersRole" id="role" key='index'}
                                <label class="radio-inline">
                                    <input type="checkbox" name="setting[material_auth][]" value="{$role.role_id}" {if in_array($role.role_id,$setting.material_auth) }checked{/if} >{$role.role_name}
                                </label>
                                {/volist}
                            </div>
                        </div>
                    </div>
                </div>
            </section>
        </section>
        <footer class="footer bg-white b-t p-t">
            <div class="form-group">
                <div class="col-sm-4 col-sm-offset-1">
                    <button type="submit" class="btn btn-primary js_save_submit" data-loading-text="保存中...">保存
                    </button>
                    <button type="button" class="btn btn-default" data-toggle="back">取消</button>
                </div>
            </div>
        </footer>
    </section>
</form>
{/block}
